﻿$(document).ready(function () {
    OccurrenceMaintenance.bindAddInvoicePopup();
});

var OccurrenceMaintenance = new function () {
    var self = this,
        container = $('#occurrence-maintenance');

    this.bindAddInvoicePopup = function () {
        var content = container.find('.add-invoice-popup'),
            openPopupButton = container.find('.open-popup-button');

        openPopupButton.unbind().click(function () {
            content.find('input').val('');
            content.openPopUp({
                additionalCancelButtons: '.cancel',
                additionalConfirmButtons: '.confirm'
            });
        });
    }
}();